import { getRandomuserParams} from '@/utils/utils';
import { request } from 'umi';
import type { UserTableListParams, UserTableListItem } from './data';




export async function queryPageUserInfo(params?: UserTableListParams) {
  console.log()
  return request('/api/queryPageUserInfo', {
    method: 'POST',
    data: getRandomuserParams(params),
  });
}



export async function addUser(params: UserTableListItem) {
  return request('/api/rule', {
    method: 'POST',
    data: {
      ...params,
      method: 'post',
    },
  });
}

export async function updateUser(params: UserTableListParams) {
  return request('/api/rule', {
    method: 'POST',
    data: {
      ...params,
      method: 'update',
    },
  });
}
